//下面全是‘/’路径下面的子路由（工具人路由，只用于与后台返回的菜单比较，特点是包含了所有的路由）
const allrouters = [
  {
    path: "welcome",
    name: "welcome",
    component: () => import(/*webpackChunkName:'welcome'*/ "../pages/Home/Welcome"),
    meta: {
      //储存一些属性
      fullPath: "/welcome",
      icon: "iconfont icon-shouye",
      name: "管理首页",
    },
  },
  {
    path: "users",
    name: "users",
    component: () => import(/*webpackChunkName:'users'*/ "../pages/Home/Users"),
    meta: {
      //储存一些属性
      fullPath: "/users",
      icon: "iconfont icon-shangpinguanli",
      name: "用户管理",
    },
  },
  {
    path: "statistics",
    name: "statistics",
    component: () => import(/*webpackChunkName:'users'*/ "../pages/Home/Statistics"),
    meta: {
      //储存一些属性
      fullPath: "/statistics",
      icon: "iconfont icon-tongji",
      name: "数据统计",
    },
  },
  {
    path: "mine",
    name: "mine",
    component: () => import(/*webpackChunkName:'users'*/ "../pages/Home/Mine"),
    meta: {
      //储存一些属性
      fullPath: "/mine",
      icon: "iconfont icon-wode",
      name: "我的中心",
    },
  },
  {
    path: "attendance",
    name: "attendance",
    component: () => import(/*webpackChunkName:'users'*/ "../pages/Home/Attendance"),
    meta: {
      //储存一些属性
      fullPath: "/attendance",
      icon: "iconfont icon-kaoqinchuqin",
      name: "考勤管理",
    },
  },
  {
    //因为是二级路由所以千万不要写一级路由和/
    path: "studentManager",
    name: "studentManager",
    component: () => import(/*webpackChunkName:'studentmanager'*/ "../pages/Home/StudentManager"),
    //因为并没有studentManager这个页面，这个只是个容器存放3个子路由，所以需要重定向
    redirect: "studentManager/product",
    meta: {
      //储存一些属性
      name: "学员管理",
      fullPath: "/studentManager",
      icon: "iconfont icon-xueyuanguanli",
    },
    children: [
      {
        //3级路由同理不需要写二级路由和一级路由和'/'
        path: "profill",
        //必须得加具名路由才能实现二级菜单的跳转 sidemenu组件只靠名字来跳转
        name: "profill",
        component: () => import(/*webpackChunkName:'profill'*/ "../pages/Home/StudentManager/profill"),
        meta: {
          //储存一些属性
          fullPath: "/studentManager/profill",
          icon: "iconfont icon-xueyuanziliao",
          name: "学员资料",
        },
      },
      {
        path: "product",
        name: "product",
        component: () => import(/*webpackChunkName:'product'*/ "../pages/Home/StudentManager/product"),
        meta: {
          //储存一些属性
          fullPath: "/studentManager/product",
          icon: "iconfont icon-shangpinguanli",
          name: "学员项目管理",
        },
      },
      {
        path: "dormitory",
        name: "dormitory",
        component: () => import(/*webpackChunkName:'dormitory'*/ "../pages/Home/StudentManager/dormitory"),
        meta: {
          //储存一些属性
          fullPath: "/studentManager/dormitory",
          icon: "iconfont icon-sushe",
          name: "学员宿舍",
        },
      },
    ],
  },
];

export default allrouters;
